#include "my_head.h"

bool modify_information(p_user_node head,int *b,char *p)
{
    if(head==NULL)
    {
        printf("error\n");
        return false;
    }
    p_user_node x=head->next;
    while(x!=NULL&&((*b)!=x->data.user_account.id||strcmp(p,x->data.user_account.password)!=0))
    { 
         x=x->next;
    } 
        printf("请修改本人角色:\n");
        scanf("%s",x->data.user_role);
        printf("请修改本人用户名:\n");
        scanf("%s",x->data.user_name);
        printf("请修改本人密码:\n");
        scanf("%s",x->data.user_account.password);  
        strcpy(p,x->data.user_account.password);
        printf("修改成功！\n");
        printf("================\n");
        return true;
}